package org.finneyfill.ajax;

import java.util.ArrayList;
import java.util.List;

import com.opensymphony.xwork2.ActionSupport;

public class CustomClassesAction extends ActionSupport {

	public List<CustomClass> getOurClasses() {
		List<CustomClass> arrayList = new ArrayList<CustomClass>();
		arrayList.add(createCustom("first name","last name", ""));
		arrayList.add(createCustom("first yes","last yes", "error message"));
		arrayList.add(createCustom("firstwebeast","lastfast", null));
		return arrayList;
	}

	private CustomClass createCustom(String firstname, String lastname, String errorMessage) {
		CustomClass ourClass = new CustomClass();
		ourClass.setFirstName(firstname);
		ourClass.setLastName(lastname);
		ourClass.setErrorMessage(errorMessage);
		return ourClass;
	}
	
}
